﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="cadastroCategoria.aspx.cs" Inherits="CestodoBebe.cadastroCategoria" %>
<%--<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>--%>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<div id="corpo">
    <div id="tituloCadastro"><h1> Cadastro de Categorias</h1></div>
    <br />
    <div id="MetadeLeft">
        <asp:UpdatePanel ID="updCampos" runat="server" UpdateModel="Always">
            <ContentTemplate>
                <br /><br />
                Nome Categoria: 
                <br />
                <asp:TextBox ID="txtNmeCategoria" runat="server" Width="250px" CssClass="txtCadastro" ValidationGroup="grpDadosCategoria"></asp:TextBox>
                <br />
                <asp:RequiredFieldValidator ID="validaNmeCategoria" runat="server" ErrorMessage="* Campo obrigatório"  SetFocusOnError="true" ControlToValidate="txtNmeCategoria" ForeColor="red" EnableClientScript="false" ValidationGroup="grpDadosCategoria"></asp:RequiredFieldValidator>
                <br /><br />
                Descrição Categoria:
                <br />
                <asp:TextBox ID="txtDescCategoria" runat="server" TextMode="MultiLine" 
                        Width="450px" Height="150px" CssClass="txtCadastro" ValidationGroup="grpDadosCategoria"></asp:TextBox> 
                <br />
                <asp:RequiredFieldValidator ID="validaDescCategoria" runat="server" ErrorMessage="* Campo obrigatório" SetFocusOnError="true" ControlToValidate="txtDescCategoria" ForeColor="red" EnableClientScript="false" ValidationGroup="grpDadosCategoria"></asp:RequiredFieldValidator>
                <br /><br />

                <asp:Button ID="btnConfirmar" runat="server" Width="150px" Text="Confirmar" BorderStyle="Groove" 
                        onclick="btnConfirmar_Click"/>
                <br />
                <br />
                <asp:Button ID="btnEditar" runat="server" Width="150px" Text="Editar" 
                    Visible="false" BorderStyle="Groove" onclick="btnEditar_Click"/>
                <asp:Button ID="btnCancelar" runat="server" Width="150px" Text="Cancelar" 
                    Visible="false" BorderStyle="Groove" onclick="btnCancelar_Click" 
                        />
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <div id="MetadeRight">
        
        <asp:UpdatePanel ID="updGrid" runat="server" UpdateModel="Always">
            <ContentTemplate>
                    <asp:GridView ID="gdCategoria" runat="server" AutoGenerateColumns="False" 
                        CellPadding="4" ForeColor="#333333" GridLines="None" 
                        Width="383px" onrowcommand="gdCategoria_RowCommand">
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                        <Columns>
                            <asp:BoundField DataField="codCategoriaProduto" HeaderText="Código" />
                            <asp:BoundField DataField="nmeCategoriaProduto" HeaderText="Nome" />
                
                            <asp:TemplateField HeaderText="Ações">
                            <ItemTemplate>
                    
                                <asp:ImageButton ID="btnExcluir" runat="server" ImageUrl="images/cross.png" CommandName="DEL" CommandArgument=<%# Eval("codCategoriaProduto") %> />
                                <asp:ImageButton ID="btnDetalhe" runat="server" ImageUrl="images/detalhes.png" CommandName="VIEW" CommandArgument=<%# Eval("codCategoriaProduto") %> />

                            </ItemTemplate>
                         </asp:TemplateField>

                            <asp:ImageField>
                            </asp:ImageField>

                        </Columns>
                        <EditRowStyle BackColor="#999999" />
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" Height="30px" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <SortedAscendingCellStyle BackColor="#E9E7E2" />
                        <SortedAscendingHeaderStyle BackColor="#506C8C" />
                        <SortedDescendingCellStyle BackColor="#FFFDF8" />
                        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                    </asp:GridView>

                </ContentTemplate>

        </asp:UpdatePanel>
    </div>
    <div id="rodape">
    </div>
</div>
<br />


</asp:Content>
